#ifndef _MAP_H
#define _MAP_H

#include "common.h"

class Tile;

class Map
{
    public:
    Map();
    Map(int width, int height);

    void eventHandle(sf::Event event);
    void inputHandle();
    void update(double dt);
    void tick(void);

    void load(String filename);

    Tile*   getTile(int x, int y);
    Tile*   getTile(sf::Vector2i coord);
    void    setTile(Tile* tile, int x, int y);
    void    setTile(Tile* tile, sf::Vector2i coords);

    int getWidth(){return width;}
    int getHeight(){return height;}
    int getGridSize(){return gridSize;}

    private:
    Tile ** grid;

    int width, height;
    int arraySize;
    int gridSize;   // Size of each grid square
};

#endif
